package com.nl.controller.web.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.nl.controller.web.bean.ModelConfig;
import com.nl.controller.web.mapper.SmsModeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class SmsModelService {

    @Autowired
    private SmsModeMapper smsModeMapper;

    //@SystemServiceLog(description = "查询短信模板配置")
    public PageInfo<ModelConfig> vieConfig(int page,int limit, String cityId, String projectId) {

        Map<String,Object> map = new HashMap<>();
        map.put("cityId",cityId);
        map.put("projectId",projectId);
        PageHelper.startPage(page, limit);
        List<ModelConfig> list = smsModeMapper.vieConfig(map);
        PageInfo<ModelConfig> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
